import './assets/main.css'

import { createApp } from 'vue'
import { createPinia, defineStore } from 'pinia'
// import { createPersistedState } from 'pinia-persistedstate-plugin'
import { createPersistedState } from 'pinia-plugin-persistedstate';
import App from './App.vue'

// 导入路由
import router from '@/router'

// 导入element-plus组件库
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 导入ant-design-vue组件库
import Antd from "ant-design-vue";
import "ant-design-vue/dist/reset.css";

import locale from 'element-plus/dist/locale/zh-cn.js'
const app = createApp(App)
// 创建pinia实例
const pinia = createPinia()
// 创建持久化状态插件实例
const persist = createPersistedState()
// 使用持久化状态插件
pinia.use(persist)
app.use(pinia)
app.use(router)
app.use(ElementPlus, { locale })
app.use(Antd)
app.mount('#app')